import React, { Component } from 'react';
import StaffHeader from './StaffHeader';
import StaffItemPanel from './StaffItemPanel';
import STAFF from './STAFF';
import axios from 'axios';

export default class App extends Component {
    constructor(){
        super();
        this.state = {
            staff : new STAFF
        };
    }
    componentDidMount(){
        axios.get('http://127.0.0.1:8081/test.json').then((res)=>{
            STAFF.rawDatas =res.data.data
            this.setState({
                staff : new STAFF
            })
        })
        axios.get('http://cloud.jss.com.cn/order/product/findProduct.do?accountToken=852898F979F346A7B74A1B7B5EA22B97&_=1530599926525').then((res)=>{
        })
    }
    componentWillUnmount(){
    }
    render() {
        return (
            <React.Fragment>
            <StaffHeader/>
            <StaffItemPanel items={this.state.staff.staff}/>
            </React.Fragment>
        );
    }
}